--- title: DEMS / Topography tools keywords: fastai sidebar: home_sidebar summary: "Provides a LOLA_TOPO class that manages `dem`, `slope`, and `aspect` maps." description: "Provides a LOLA_TOPO class that manages `dem`, `slope`, and `aspect` maps." nb_path: "01_dems.ipynb" ---
class LOLA_TOPO[source]
LOLA_TOPO(dataset='divgdr',lat_limit=None)
Data reader class for LOLA Topography data.
It accesses preproduced data for 128 ppd for DEM, slope, and aspect,
located on the luna4 disk.
It uses virtual dask.Arrays so that virtually no memory is consumed until you
resolve a chain of operations with the `.compute()` call.
Attributes
----------
dem: xarray.DataArray
LOLA DEM 128 ppd
slope: xarray.DataArray
Slope in percent, derived from `dem` using `gdaldem` command line tool.
aspect: xarray.DataArray
Aspect in degrees, derived from `dem` using `gdaldem` command line tool.
topo = LOLA_TOPO(lat_limit=80)
Aspect converted.
{% include note.html content='The keys of the fnames dict become attributes in the class, storing the opened xarrays.' %}
The xarray.DataArray object is a very rich object for n-dimensional datacubes with physical dimensions.
Sometimes we need to cut off some latitudes because some products have been produced only up to a certain latitude.
This is necessary if one needs the exact same pixels as another map product, for pixel-based slicing through multiple data products.
Otherwise, xarray offers also direct index-label-value-based access, i.e. lat/lon coordinates.
LOLA_TOPO.slice_lat[source]
LOLA_TOPO.slice_lat(data,lat)
Return the map `data` constrained to lat <= `lat`.
Parameters
----------
data: {'dem', 'slope','aspect'}
String that choses which data product should be constrained.
lat: int, float
Limiting latitude value.
topo.slice_lat("slope", 80)
<xarray.DataArray (lat: 20480, lon: 46080)>
dask.array<getitem, shape=(20480, 46080), dtype=float64, chunksize=(2048, 4096), chunktype=numpy.ndarray>
Coordinates:
y (lat) float64 2.426e+06 2.426e+06 ... -2.426e+06 -2.426e+06
x (lon) float64 -5.458e+06 -5.458e+06 ... 5.458e+06 5.458e+06
* lat (lat) float64 80.0 79.99 79.98 79.98 ... -79.98 -79.98 -79.99 -80.0
* lon (lon) float64 0.0 0.007812 0.01562 0.02344 ... 360.0 360.0 360.0
Attributes:
transform: (236.901, 0.0, -5458199.04, 0.0, -236.901, 27...
crs: +proj=eqc +lat_ts=0 +lat_0=0 +lon_0=180 +x_0=...
res: (236.901, 236.901)
is_tiled: 1
nodatavals: (-32768.0,)
scales: (0.01,)
offsets: (0.0,)
AREA_OR_POINT: Area
DATA_SET_ID: "LRO-L-LOLA-4-GDR-V1.0-SLOPE"
INSTRUMENT_ID: "LOLA"
INSTRUMENT_NAME: "LUNAR ORBITER LASER ALTIMETER"
PRODUCER_INSTITUTION_NAME: "UNIVERSITY OF CALIFORNIA, LOS ANGELES"
PRODUCT_CREATION_TIME: 2012-10-16
PRODUCT_ID: "LDEM_128_SLOPE_IMG"
START_TIME: 2009-07-13T17:33:17.246
STOP_TIME: 2011-11-14T03:44:53
TARGET_NAME: MOON
|
array([ 2425747.7895, 2425510.8885, 2425273.9875, ..., -2425273.9875,
-2425510.8885, -2425747.7895])array([-5458080.5895, -5457843.6885, -5457606.7875, ..., 5457606.7875,
5457843.6885, 5458080.5895])array([ 79.999566, 79.991753, 79.98394 , ..., -79.98394 , -79.991753,
-79.999566])array([0.000000e+00, 7.812500e-03, 1.562500e-02, ..., 3.599766e+02,
3.599844e+02, 3.599922e+02])topo.get_slice('slope', 20, 131, dlat=1, dlon=1)
<xarray.DataArray (lat: 128, lon: 129)>
dask.array<getitem, shape=(128, 129), dtype=float64, chunksize=(128, 129), chunktype=numpy.ndarray>
Coordinates:
y (lat) float64 6.367e+05 6.364e+05 6.362e+05 ... 6.068e+05 6.066e+05
x (lon) float64 -1.486e+06 -1.485e+06 ... -1.456e+06 -1.455e+06
* lat (lat) float64 21.0 20.99 20.98 20.97 ... 20.03 20.02 20.01 20.0
* lon (lon) float64 131.0 131.0 131.0 131.0 ... 132.0 132.0 132.0 132.0
Attributes:
transform: (236.901, 0.0, -5458199.04, 0.0, -236.901, 27...
crs: +proj=eqc +lat_ts=0 +lat_0=0 +lon_0=180 +x_0=...
res: (236.901, 236.901)
is_tiled: 1
nodatavals: (-32768.0,)
scales: (0.01,)
offsets: (0.0,)
AREA_OR_POINT: Area
DATA_SET_ID: "LRO-L-LOLA-4-GDR-V1.0-SLOPE"
INSTRUMENT_ID: "LOLA"
INSTRUMENT_NAME: "LUNAR ORBITER LASER ALTIMETER"
PRODUCER_INSTITUTION_NAME: "UNIVERSITY OF CALIFORNIA, LOS ANGELES"
PRODUCT_CREATION_TIME: 2012-10-16
PRODUCT_ID: "LDEM_128_SLOPE_IMG"
START_TIME: 2009-07-13T17:33:17.246
STOP_TIME: 2011-11-14T03:44:53
TARGET_NAME: MOON
|
array([636671.4375, 636434.5365, 636197.6355, 635960.7345, 635723.8335,
635486.9325, 635250.0315, 635013.1305, 634776.2295, 634539.3285,
634302.4275, 634065.5265, 633828.6255, 633591.7245, 633354.8235,
633117.9225, 632881.0215, 632644.1205, 632407.2195, 632170.3185,
631933.4175, 631696.5165, 631459.6155, 631222.7145, 630985.8135,
630748.9125, 630512.0115, 630275.1105, 630038.2095, 629801.3085,
629564.4075, 629327.5065, 629090.6055, 628853.7045, 628616.8035,
628379.9025, 628143.0015, 627906.1005, 627669.1995, 627432.2985,
627195.3975, 626958.4965, 626721.5955, 626484.6945, 626247.7935,
626010.8925, 625773.9915, 625537.0905, 625300.1895, 625063.2885,
624826.3875, 624589.4865, 624352.5855, 624115.6845, 623878.7835,
623641.8825, 623404.9815, 623168.0805, 622931.1795, 622694.2785,
622457.3775, 622220.4765, 621983.5755, 621746.6745, 621509.7735,
621272.8725, 621035.9715, 620799.0705, 620562.1695, 620325.2685,
620088.3675, 619851.4665, 619614.5655, 619377.6645, 619140.7635,
618903.8625, 618666.9615, 618430.0605, 618193.1595, 617956.2585,
617719.3575, 617482.4565, 617245.5555, 617008.6545, 616771.7535,
616534.8525, 616297.9515, 616061.0505, 615824.1495, 615587.2485,
615350.3475, 615113.4465, 614876.5455, 614639.6445, 614402.7435,
614165.8425, 613928.9415, 613692.0405, 613455.1395, 613218.2385,
612981.3375, 612744.4365, 612507.5355, 612270.6345, 612033.7335,
611796.8325, 611559.9315, 611323.0305, 611086.1295, 610849.2285,
610612.3275, 610375.4265, 610138.5255, 609901.6245, 609664.7235,
609427.8225, 609190.9215, 608954.0205, 608717.1195, 608480.2185,
608243.3175, 608006.4165, 607769.5155, 607532.6145, 607295.7135,
607058.8125, 606821.9115, 606585.0105])array([-1485724.6215, -1485487.7205, -1485250.8195, -1485013.9185,
-1484777.0175, -1484540.1165, -1484303.2155, -1484066.3145,
-1483829.4135, -1483592.5125, -1483355.6115, -1483118.7105,
-1482881.8095, -1482644.9085, -1482408.0075, -1482171.1065,
-1481934.2055, -1481697.3045, -1481460.4035, -1481223.5025,
-1480986.6015, -1480749.7005, -1480512.7995, -1480275.8985,
-1480038.9975, -1479802.0965, -1479565.1955, -1479328.2945,
-1479091.3935, -1478854.4925, -1478617.5915, -1478380.6905,
-1478143.7895, -1477906.8885, -1477669.9875, -1477433.0865,
-1477196.1855, -1476959.2845, -1476722.3835, -1476485.4825,
-1476248.5815, -1476011.6805, -1475774.7795, -1475537.8785,
-1475300.9775, -1475064.0765, -1474827.1755, -1474590.2745,
-1474353.3735, -1474116.4725, -1473879.5715, -1473642.6705,
-1473405.7695, -1473168.8685, -1472931.9675, -1472695.0665,
-1472458.1655, -1472221.2645, -1471984.3635, -1471747.4625,
-1471510.5615, -1471273.6605, -1471036.7595, -1470799.8585,
-1470562.9575, -1470326.0565, -1470089.1555, -1469852.2545,
-1469615.3535, -1469378.4525, -1469141.5515, -1468904.6505,
-1468667.7495, -1468430.8485, -1468193.9475, -1467957.0465,
-1467720.1455, -1467483.2445, -1467246.3435, -1467009.4425,
-1466772.5415, -1466535.6405, -1466298.7395, -1466061.8385,
-1465824.9375, -1465588.0365, -1465351.1355, -1465114.2345,
-1464877.3335, -1464640.4325, -1464403.5315, -1464166.6305,
-1463929.7295, -1463692.8285, -1463455.9275, -1463219.0265,
-1462982.1255, -1462745.2245, -1462508.3235, -1462271.4225,
-1462034.5215, -1461797.6205, -1461560.7195, -1461323.8185,
-1461086.9175, -1460850.0165, -1460613.1155, -1460376.2145,
-1460139.3135, -1459902.4125, -1459665.5115, -1459428.6105,
-1459191.7095, -1458954.8085, -1458717.9075, -1458481.0065,
-1458244.1055, -1458007.2045, -1457770.3035, -1457533.4025,
-1457296.5015, -1457059.6005, -1456822.6995, -1456585.7985,
-1456348.8975, -1456111.9965, -1455875.0955, -1455638.1945,
-1455401.2935])array([20.997005, 20.989192, 20.981379, 20.973567, 20.965754, 20.957941,
20.950128, 20.942315, 20.934502, 20.92669 , 20.918877, 20.911064,
20.903251, 20.895438, 20.887625, 20.879812, 20.872 , 20.864187,
20.856374, 20.848561, 20.840748, 20.832935, 20.825123, 20.81731 ,
20.809497, 20.801684, 20.793871, 20.786058, 20.778246, 20.770433,
20.76262 , 20.754807, 20.746994, 20.739181, 20.731369, 20.723556,
20.715743, 20.70793 , 20.700117, 20.692304, 20.684492, 20.676679,
20.668866, 20.661053, 20.65324 , 20.645427, 20.637614, 20.629802,
20.621989, 20.614176, 20.606363, 20.59855 , 20.590737, 20.582925,
20.575112, 20.567299, 20.559486, 20.551673, 20.54386 , 20.536048,
20.528235, 20.520422, 20.512609, 20.504796, 20.496983, 20.489171,
20.481358, 20.473545, 20.465732, 20.457919, 20.450106, 20.442294,
20.434481, 20.426668, 20.418855, 20.411042, 20.403229, 20.395416,
20.387604, 20.379791, 20.371978, 20.364165, 20.356352, 20.348539,
20.340727, 20.332914, 20.325101, 20.317288, 20.309475, 20.301662,
20.29385 , 20.286037, 20.278224, 20.270411, 20.262598, 20.254785,
20.246973, 20.23916 , 20.231347, 20.223534, 20.215721, 20.207908,
20.200095, 20.192283, 20.18447 , 20.176657, 20.168844, 20.161031,
20.153218, 20.145406, 20.137593, 20.12978 , 20.121967, 20.114154,
20.106341, 20.098529, 20.090716, 20.082903, 20.07509 , 20.067277,
20.059464, 20.051652, 20.043839, 20.036026, 20.028213, 20.0204 ,
20.012587, 20.004775])array([131. , 131.007812, 131.015625, 131.023438, 131.03125 , 131.039062,
131.046875, 131.054688, 131.0625 , 131.070312, 131.078125, 131.085938,
131.09375 , 131.101562, 131.109375, 131.117188, 131.125 , 131.132812,
131.140625, 131.148438, 131.15625 , 131.164062, 131.171875, 131.179688,
131.1875 , 131.195312, 131.203125, 131.210938, 131.21875 , 131.226562,
131.234375, 131.242188, 131.25 , 131.257812, 131.265625, 131.273438,
131.28125 , 131.289062, 131.296875, 131.304688, 131.3125 , 131.320312,
131.328125, 131.335938, 131.34375 , 131.351562, 131.359375, 131.367188,
131.375 , 131.382812, 131.390625, 131.398438, 131.40625 , 131.414062,
131.421875, 131.429688, 131.4375 , 131.445312, 131.453125, 131.460938,
131.46875 , 131.476562, 131.484375, 131.492188, 131.5 , 131.507812,
131.515625, 131.523438, 131.53125 , 131.539062, 131.546875, 131.554688,
131.5625 , 131.570312, 131.578125, 131.585938, 131.59375 , 131.601562,
131.609375, 131.617188, 131.625 , 131.632812, 131.640625, 131.648438,
131.65625 , 131.664062, 131.671875, 131.679688, 131.6875 , 131.695312,
131.703125, 131.710938, 131.71875 , 131.726562, 131.734375, 131.742188,
131.75 , 131.757812, 131.765625, 131.773438, 131.78125 , 131.789062,
131.796875, 131.804688, 131.8125 , 131.820312, 131.828125, 131.835938,
131.84375 , 131.851562, 131.859375, 131.867188, 131.875 , 131.882812,
131.890625, 131.898438, 131.90625 , 131.914062, 131.921875, 131.929688,
131.9375 , 131.945312, 131.953125, 131.960938, 131.96875 , 131.976562,
131.984375, 131.992188, 132. ])azi_slice = topo.get_slice('aspect', 20, 131, dlat=1, dlon=1)
azi_slice.compute()
<xarray.DataArray (lat: 128, lon: 129)>
array([[139. , 139.5, 135.9, ..., 27.6, 16.6, 8.1],
[143.4, 141.7, 136.1, ..., 37. , 20.6, 14.5],
[144.7, 141.1, 135.4, ..., 39.2, 28.4, 25.2],
...,
[315.6, 333.2, 307.8, ..., 134.2, 132.3, 131.5],
[299.7, 306.5, 312.6, ..., 137.5, 134.2, 131.9],
[321.4, 322.4, 316.1, ..., 141.6, 140.1, 135.9]])
Coordinates:
y (lat) float64 6.367e+05 6.364e+05 6.362e+05 ... 6.068e+05 6.066e+05
x (lon) float64 -1.486e+06 -1.485e+06 ... -1.456e+06 -1.455e+06
* lat (lat) float64 21.0 20.99 20.98 20.97 ... 20.03 20.02 20.01 20.0
* lon (lon) float64 131.0 131.0 131.0 131.0 ... 132.0 132.0 132.0 132.0array([[139. , 139.5, 135.9, ..., 27.6, 16.6, 8.1],
[143.4, 141.7, 136.1, ..., 37. , 20.6, 14.5],
[144.7, 141.1, 135.4, ..., 39.2, 28.4, 25.2],
...,
[315.6, 333.2, 307.8, ..., 134.2, 132.3, 131.5],
[299.7, 306.5, 312.6, ..., 137.5, 134.2, 131.9],
[321.4, 322.4, 316.1, ..., 141.6, 140.1, 135.9]])array([636671.4375, 636434.5365, 636197.6355, 635960.7345, 635723.8335,
635486.9325, 635250.0315, 635013.1305, 634776.2295, 634539.3285,
634302.4275, 634065.5265, 633828.6255, 633591.7245, 633354.8235,
633117.9225, 632881.0215, 632644.1205, 632407.2195, 632170.3185,
631933.4175, 631696.5165, 631459.6155, 631222.7145, 630985.8135,
630748.9125, 630512.0115, 630275.1105, 630038.2095, 629801.3085,
629564.4075, 629327.5065, 629090.6055, 628853.7045, 628616.8035,
628379.9025, 628143.0015, 627906.1005, 627669.1995, 627432.2985,
627195.3975, 626958.4965, 626721.5955, 626484.6945, 626247.7935,
626010.8925, 625773.9915, 625537.0905, 625300.1895, 625063.2885,
624826.3875, 624589.4865, 624352.5855, 624115.6845, 623878.7835,
623641.8825, 623404.9815, 623168.0805, 622931.1795, 622694.2785,
622457.3775, 622220.4765, 621983.5755, 621746.6745, 621509.7735,
621272.8725, 621035.9715, 620799.0705, 620562.1695, 620325.2685,
620088.3675, 619851.4665, 619614.5655, 619377.6645, 619140.7635,
618903.8625, 618666.9615, 618430.0605, 618193.1595, 617956.2585,
617719.3575, 617482.4565, 617245.5555, 617008.6545, 616771.7535,
616534.8525, 616297.9515, 616061.0505, 615824.1495, 615587.2485,
615350.3475, 615113.4465, 614876.5455, 614639.6445, 614402.7435,
614165.8425, 613928.9415, 613692.0405, 613455.1395, 613218.2385,
612981.3375, 612744.4365, 612507.5355, 612270.6345, 612033.7335,
611796.8325, 611559.9315, 611323.0305, 611086.1295, 610849.2285,
610612.3275, 610375.4265, 610138.5255, 609901.6245, 609664.7235,
609427.8225, 609190.9215, 608954.0205, 608717.1195, 608480.2185,
608243.3175, 608006.4165, 607769.5155, 607532.6145, 607295.7135,
607058.8125, 606821.9115, 606585.0105])array([-1485724.6215, -1485487.7205, -1485250.8195, -1485013.9185,
-1484777.0175, -1484540.1165, -1484303.2155, -1484066.3145,
-1483829.4135, -1483592.5125, -1483355.6115, -1483118.7105,
-1482881.8095, -1482644.9085, -1482408.0075, -1482171.1065,
-1481934.2055, -1481697.3045, -1481460.4035, -1481223.5025,
-1480986.6015, -1480749.7005, -1480512.7995, -1480275.8985,
-1480038.9975, -1479802.0965, -1479565.1955, -1479328.2945,
-1479091.3935, -1478854.4925, -1478617.5915, -1478380.6905,
-1478143.7895, -1477906.8885, -1477669.9875, -1477433.0865,
-1477196.1855, -1476959.2845, -1476722.3835, -1476485.4825,
-1476248.5815, -1476011.6805, -1475774.7795, -1475537.8785,
-1475300.9775, -1475064.0765, -1474827.1755, -1474590.2745,
-1474353.3735, -1474116.4725, -1473879.5715, -1473642.6705,
-1473405.7695, -1473168.8685, -1472931.9675, -1472695.0665,
-1472458.1655, -1472221.2645, -1471984.3635, -1471747.4625,
-1471510.5615, -1471273.6605, -1471036.7595, -1470799.8585,
-1470562.9575, -1470326.0565, -1470089.1555, -1469852.2545,
-1469615.3535, -1469378.4525, -1469141.5515, -1468904.6505,
-1468667.7495, -1468430.8485, -1468193.9475, -1467957.0465,
-1467720.1455, -1467483.2445, -1467246.3435, -1467009.4425,
-1466772.5415, -1466535.6405, -1466298.7395, -1466061.8385,
-1465824.9375, -1465588.0365, -1465351.1355, -1465114.2345,
-1464877.3335, -1464640.4325, -1464403.5315, -1464166.6305,
-1463929.7295, -1463692.8285, -1463455.9275, -1463219.0265,
-1462982.1255, -1462745.2245, -1462508.3235, -1462271.4225,
-1462034.5215, -1461797.6205, -1461560.7195, -1461323.8185,
-1461086.9175, -1460850.0165, -1460613.1155, -1460376.2145,
-1460139.3135, -1459902.4125, -1459665.5115, -1459428.6105,
-1459191.7095, -1458954.8085, -1458717.9075, -1458481.0065,
-1458244.1055, -1458007.2045, -1457770.3035, -1457533.4025,
-1457296.5015, -1457059.6005, -1456822.6995, -1456585.7985,
-1456348.8975, -1456111.9965, -1455875.0955, -1455638.1945,
-1455401.2935])array([20.997005, 20.989192, 20.981379, 20.973567, 20.965754, 20.957941,
20.950128, 20.942315, 20.934502, 20.92669 , 20.918877, 20.911064,
20.903251, 20.895438, 20.887625, 20.879812, 20.872 , 20.864187,
20.856374, 20.848561, 20.840748, 20.832935, 20.825123, 20.81731 ,
20.809497, 20.801684, 20.793871, 20.786058, 20.778246, 20.770433,
20.76262 , 20.754807, 20.746994, 20.739181, 20.731369, 20.723556,
20.715743, 20.70793 , 20.700117, 20.692304, 20.684492, 20.676679,
20.668866, 20.661053, 20.65324 , 20.645427, 20.637614, 20.629802,
20.621989, 20.614176, 20.606363, 20.59855 , 20.590737, 20.582925,
20.575112, 20.567299, 20.559486, 20.551673, 20.54386 , 20.536048,
20.528235, 20.520422, 20.512609, 20.504796, 20.496983, 20.489171,
20.481358, 20.473545, 20.465732, 20.457919, 20.450106, 20.442294,
20.434481, 20.426668, 20.418855, 20.411042, 20.403229, 20.395416,
20.387604, 20.379791, 20.371978, 20.364165, 20.356352, 20.348539,
20.340727, 20.332914, 20.325101, 20.317288, 20.309475, 20.301662,
20.29385 , 20.286037, 20.278224, 20.270411, 20.262598, 20.254785,
20.246973, 20.23916 , 20.231347, 20.223534, 20.215721, 20.207908,
20.200095, 20.192283, 20.18447 , 20.176657, 20.168844, 20.161031,
20.153218, 20.145406, 20.137593, 20.12978 , 20.121967, 20.114154,
20.106341, 20.098529, 20.090716, 20.082903, 20.07509 , 20.067277,
20.059464, 20.051652, 20.043839, 20.036026, 20.028213, 20.0204 ,
20.012587, 20.004775])array([131. , 131.007812, 131.015625, 131.023438, 131.03125 , 131.039062,
131.046875, 131.054688, 131.0625 , 131.070312, 131.078125, 131.085938,
131.09375 , 131.101562, 131.109375, 131.117188, 131.125 , 131.132812,
131.140625, 131.148438, 131.15625 , 131.164062, 131.171875, 131.179688,
131.1875 , 131.195312, 131.203125, 131.210938, 131.21875 , 131.226562,
131.234375, 131.242188, 131.25 , 131.257812, 131.265625, 131.273438,
131.28125 , 131.289062, 131.296875, 131.304688, 131.3125 , 131.320312,
131.328125, 131.335938, 131.34375 , 131.351562, 131.359375, 131.367188,
131.375 , 131.382812, 131.390625, 131.398438, 131.40625 , 131.414062,
131.421875, 131.429688, 131.4375 , 131.445312, 131.453125, 131.460938,
131.46875 , 131.476562, 131.484375, 131.492188, 131.5 , 131.507812,
131.515625, 131.523438, 131.53125 , 131.539062, 131.546875, 131.554688,
131.5625 , 131.570312, 131.578125, 131.585938, 131.59375 , 131.601562,
131.609375, 131.617188, 131.625 , 131.632812, 131.640625, 131.648438,
131.65625 , 131.664062, 131.671875, 131.679688, 131.6875 , 131.695312,
131.703125, 131.710938, 131.71875 , 131.726562, 131.734375, 131.742188,
131.75 , 131.757812, 131.765625, 131.773438, 131.78125 , 131.789062,
131.796875, 131.804688, 131.8125 , 131.820312, 131.828125, 131.835938,
131.84375 , 131.851562, 131.859375, 131.867188, 131.875 , 131.882812,
131.890625, 131.898438, 131.90625 , 131.914062, 131.921875, 131.929688,
131.9375 , 131.945312, 131.953125, 131.960938, 131.96875 , 131.976562,
131.984375, 131.992188, 132. ])assert isinstance(topo.dem_fpath, Path)
assert isinstance(topo.slope_fpath, Path)
assert isinstance(topo.aspect_fpath, Path)
assert isinstance(topo.dem, xr.DataArray)
assert isinstance(topo.slope, xr.DataArray)
assert isinstance(topo.aspect, xr.DataArray)
assert topo.dem.ndim == 2
assert topo.slope.ndim == 2
assert topo.aspect.ndim == 2
LOLA_TOPO.convert_to_180longitude[source]
LOLA_TOPO.convert_to_180longitude()
Switch all three maps to -180/180 longitude system.
topo.convert_to_180longitude()
topo.dem.lon
<xarray.DataArray 'lon' (lon: 46080)>
array([-180. , -179.992188, -179.984375, ..., 179.976562, 179.984375,
179.992188])
Coordinates:
x (lon) float64 118.5 355.4 592.3 829.2 ... -592.3 -355.4 -118.5
* lon (lon) float64 -180.0 -180.0 -180.0 -180.0 ... 180.0 180.0 180.0array([-180. , -179.992188, -179.984375, ..., 179.976562, 179.984375,
179.992188])array([ 118.4505, 355.3515, 592.2525, ..., -592.2525, -355.3515, -118.4505])
array([-180. , -179.992188, -179.984375, ..., 179.976562, 179.984375,
179.992188])LOLA_TOPO.convert_to_360longitude[source]
LOLA_TOPO.convert_to_360longitude()
Switch all three maps to 360 longitude system.
topo.convert_to_360longitude()
topo.dem.lon
<xarray.DataArray 'lon' (lon: 46080)>
array([0.000000e+00, 7.812500e-03, 1.562500e-02, ..., 3.599766e+02,
3.599844e+02, 3.599922e+02])
Coordinates:
x (lon) float64 -5.458e+06 -5.458e+06 ... 5.458e+06 5.458e+06
* lon (lon) float64 0.0 0.007812 0.01562 0.02344 ... 360.0 360.0 360.0array([0.000000e+00, 7.812500e-03, 1.562500e-02, ..., 3.599766e+02,
3.599844e+02, 3.599922e+02])array([-5458080.5895, -5457843.6885, -5457606.7875, ..., 5457606.7875,
5457843.6885, 5458080.5895])array([0.000000e+00, 7.812500e-03, 1.562500e-02, ..., 3.599766e+02,
3.599844e+02, 3.599922e+02])topo.plot_dem(20, 130, dlon=2)
topo.plot_slope(20, 130, dlon=2)
topo.plot_aspect(20, 130, dlon=2)
lat = 20.572
lon = 131.301
topo.get_elev_by_coord(lat, lon)
263.25
topo.get_az_by_coord(lat, lon)
197.1
from nbdev.export import notebook2script
notebook2script()
Converted 00_core.ipynb. Converted 01_dems.ipynb. Converted 01a_dem_corrections.ipynb. Converted 02_divdata.ipynb. Converted 03_l2data.ipynb. Converted 04_l3data.ipynb. Converted index.ipynb.